﻿using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Microsoft.Silverlight.Testing;

namespace Columbus.Tests.Testing
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
            Loaded += (a, b) =>
                          {
                              SystemTray.IsVisible = false;
                              var settings = UnitTestSystem.CreateDefaultSettings();
                              var testHarness = settings.TestHarness;
                              testHarness.Settings = settings;
                              var page = new MobileTestPage(testHarness);
                              Content = page;
                              BackKeyPress += (x, xe) => xe.Cancel = page.NavigateBack();
                          };
        }
    }
}